<!--
 * @Autor: dingxiaolin
 * @Date: 2020-11-28 14:06:24
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2020-12-25 01:06:39
-->
<template>
  <view id="mine">
    <view class="mine-head" @click='changeImg'>
      <open-data type="userAvatarUrl" class="user-img" v-if="user.name===''"></open-data>
      <open-data type="userNickName" class="user-name"></open-data>
      <image class="user-img" :src='user.imgSrc' v-if="user.name!==''"></image>
    </view>

	<view style="margin:0 10px;">
        <van-cell
        is-link
        title="管理创建的纪念馆"
        link-type="navigateTo"
        url="/pages/guanzi/main"
        />
        
        <view class="row-btn">
        <button type="primary" class="logout-btn" @click="logout">返回首页</button>
        </view>
        </view>
  </view>
</template>
<script>
  import { upLoad } from '@/utils/upload'
  import store from '../../store'
  import api from '@/http/api'
  export default {
    data () {
      return {
        user:{
          imgSrc:'cloud://node-d5ba16-6g1t1a41148f5184.6e6f-node-d5ba16-6g1t1a41148f5184-1304401256/images/moren.png',
          name:'',
        }
      }
    },
    created () {
    },
    onLoad(){
	
    },
    onShow(){
    },
    methods: {
      /**
       * 退出登录
       */
      logout(){
        wx.reLaunch({
          url: '/pages/login/index'
        })
      },
    },
	
  }
</script>
<style scoped>
  #mine{
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #F3F3F3;
  }
  .mine-head{
    display: flex;
    flex-direction: column;
    width:100%;
    height:300px;
    justify-content: center;
    align-items: center;
    background: #60947D;
  }
  .user-img{
    width: 168rpx;
    height: 168rpx;
    border-radius:50%;
    overflow:hidden;
    margin:0rpx auto;
  }
  .user-name{
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    margin:2% auto 0rpx;
    font-family: PingFangSC-Semibold;
    font-size: 28rpx;
    color: #fff;
    letter-spacing: 0.42rpx;
  }
  
  .logout-btn{
    width:100%;
    height: 80rpx;
    line-height: 80rpx;
    margin-top:400px;
    background: #60947D;
    border-radius: 8rpx;
    /* border: 2rpx solid #999999; */
    font-size: 28rpx;
    letter-spacing: 0.36rpx;
    color: #fff;
  }
</style>



